package com.headStorm.mavlinkDemo;


import io.dronefleet.mavlink.protocol.MavlinkPacket;

public class Mavlink2Message<T> extends MavlinkMessage<T> {

    private final MavlinkPacket packet;
    public Mavlink2Message(MavlinkPacket packet, T payload) {
        super(packet, payload);
        this.packet = packet;
    }

    public boolean isSigned() {
        return this.packet.isSigned();
    }

    public boolean validateSignature(byte[] secretKey) {
        return this.packet.validateSignature(secretKey);
    }

    public long getSignatureTimestamp() {
        return this.packet.getSignatureTimestamp();
    }

    public int getSignatureLinkId() {
        return this.packet.getSignatureLinkId();
    }

    public byte[] getSignature() {
        return this.packet.getSignature();
    }
}
